<h1>Listing skills</h1>

<table>
  <tr>
    <th>Name</th>
	<th>Employees</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @skills.each do |skill| %>
  <tr>
    <td><%= skill.name %></td>
	<td>
	  <% skill.employees.each do |employee| %>
	    |<b><%= link_to(employee.name, employee) %></b>|
	  <% end %>
	</td>
    <td><%= link_to 'Show', skill %></td>
    <td><%= link_to 'Edit', edit_skill_path(skill) %></td>
    <td><%= link_to 'Destroy', skill, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'Home', root_path %> |
<%= link_to 'New Skill', new_skill_path %>

